how to solve symmetric Matrix